 <?php 
 $to = $_POST['email'];
 $headers = "From: iPetty <noreply@ipetty.co.za>"; 
 $subject = "Temporary Password"; 
  
 $body = "Hi there,\n\nWe see you lost your password?\n\nNo worries, we've got you covered.\n\nHere follows your temporary password: ".$unhash."\n\nBe Blessed\n\niPetty Team"; 
 
 $send = mail($to, $subject, $body, $headers); 
 if($send) 
 {$yayMessage = "Your temporary password has been sent to your email address";} 
 else 
 {$errorMessage = "An error has occured during the email process"; } 

 ?> 